package com.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("article")
public class Article implements Serializable {
    /**
     * 文章id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 文章题目
     */
    @TableField
    private String title;
    /**
     * 该文章的用户id
     */
    @TableField
    private Long userId;
    /**
     * 该文章概述
     */
    @TableField
    private String summary;
    /**
     * 点赞数
     */
    @TableField
    private Long pollCount;
    /**
     * 评论数
     */
    @TableField
    private Long commentCount;
    /**
     * 阅读数
     */
    @TableField
    private Long readCount;
    /**
     * 是否精华
     */
    @TableField
    private Integer isEssence;
    /**
     * 是否置顶
     */
    @TableField
    private Integer isTop;
    /**
     * 创建时间
     */
    @TableField
    private LocalDateTime createDatetime;
    /**
     * 更新时间
     */
    @TableField
    private LocalDateTime updateDatetime;
}
